﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using KC.Framework.Extension;
using  KC.DTO.Core;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;
using KC.Enums.Admin;

namespace KC.DTO.Account
{
     [Serializable, DataContract(IsReference = true)]
    public class WorkOrderDetailDTO: EntityDTO
    {
         public WorkOrderDetailDTO()
         {
             WorkOrderDetailLogs = new List<WorkOrderDetailLogDTO>();
         }
        [Key]
        [DataMember]
        public int Id { get; set; }

        /// <summary>
        /// 回复内容
        /// </summary>
        [DataMember]
         public string Content { get; set; }

        /// <summary>
        /// 回复人UserName
        /// </summary>
        [DataMember]
         public string ReplyUserName { get; set; }

        /// <summary>
        /// 回复人名称
        /// </summary>
        [DataMember]
         public string ReplyDisplayName { get; set; }

        /// <summary>
        /// 引用Id
        /// </summary>
        [DataMember]
         public int ReferenceId { get; set; }

        /// <summary>
        /// 是否回复
        /// </summary>
        [DataMember]
         public bool IsReply { get; set; }

        [DataMember]
        public string CreatedDateStr
        {
            get
            {
                return DateTimeExtensions.ToLocalDateTime(this.CreatedDate).ToString();
            }
        }

        /// <summary>
        /// 订单Id
        /// </summary>
        [DataMember]
         public int OrderId { get; set; }

        [DataMember]
        public string OperatorId { get; set; }

        [DataMember]
        public string OperatorDisplayName { get; set; }

        [DataMember]
        public virtual List<WorkOrderDetailLogDTO> WorkOrderDetailLogs { get; set; }

    }
}
